package com.ysd.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ysd.entity.Roles;
import com.ysd.service.RolesService;
import com.ysd.util.Result;

@RestController
public class RolesController {
	@Autowired
	RolesService rS;
	@RequestMapping("getRoles")
	public Object getRoles() {
		List<Roles> list=rS.findRoles();
		if (list!=null) {
			return Result.toClient("0", "查询成功", null, list);
		}
		return Result.toClient("1", "查询失败");
	}
}
